package apiday05.exception;

public class ThrowDemo {
    public static void main(String[] args) {
        Person p = new Person();
        try {
            p.setAge(18);
            p.setAge(10000);
        } catch (Exception e) {
            System.out.println("出错了");
        }
        System.out.println("此人年龄："+p.getAge()+"岁");
    }
}
